﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace DemoMidiDuSkill.ViewModel
{
    /// <summary>
    /// Base class for view model
    /// </summary>
    public class ViewModelBase : INotifyPropertyChanged
    {
        protected const String NotifyPropertyChanged_Name = "NotifyPropertyChanged";

        #region Public methods

        /// <summary>
        /// Notifies a property has changed
        /// </summary>
        /// <param name="pPropertyName"></param>
        public void NotifyPropertyChanged(String pPropertyName)
        {
            if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(pPropertyName));
        }

        #endregion

        #region INotifyPropertyChanged Members

        /// <summary>
        /// Occurs when a property has changed
        /// </summary>
        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }
}
